Probability Mass Function(PMF) and Cumulative Distribution Function(CDF)

Hey there! Welcome to KnowledgeKnot! Don't forget to share this with your friends and revisit often. Your support motivates us to create more content in the future. Thanks for being awesome!

Prerequisites: Random Variables

PMF and CDF

Probability Mass Function (PMF) and Cumulative Distribution Function (CDF) are two fundamental concepts in probability theory and statistics. They are used to describe the distribution of discrete random variables and provide valuable information about the probabilities associated with different outcomes.

Probability Mass Function (PMF)

The PMF of a discrete random variable X is a function that gives the probability that X takes on a specific value. It maps each possible value of X to its probability. The PMF is denoted by P(X=x)P(X = x) or p(x)p(x), where x is a particular value of X.

Mathematically, the PMF is defined as:

P(X=x)=p(x)P(X = x) = p(x)

Example:

Let's consider a fair six-sided die. The PMF of the die's outcome X (the number rolled) is:

p(x)={16,if x=1,2,3,4,5, or 60,otherwisep(x) = \begin{cases} \frac{1}{6}, & \text{if } x = 1, 2, 3, 4, 5, \text{ or } 6 \\ 0, & \text{otherwise} \end{cases}

This PMF indicates that each outcome has an equal probability of 16\frac{1}{6}.

Cumulative Distribution Function (CDF)

The CDF of a random variable X is a function that gives the probability that X is less than or equal to a specific value. It represents the cumulative probability distribution of X. The CDF is denoted by F(x)F(x), where x is a particular value of X.

Mathematically, the CDF is defined as:

F(x)=P(Xx)F(x) = P(X \leq x)

Example:

Using the same example of the fair six-sided die, the CDF of the die's outcome X is:

F(x)={0,if x<116,if 1x<213,if 2x<312,if 3x<423,if 4x<556,if 5x<61,if x6F(x) = \begin{cases} 0, & \text{if } x < 1 \\ \frac{1}{6}, & \text{if } 1 \leq x < 2 \\ \frac{1}{3}, & \text{if } 2 \leq x < 3 \\ \frac{1}{2}, & \text{if } 3 \leq x < 4 \\ \frac{2}{3}, & \text{if } 4 \leq x < 5 \\ \frac{5}{6}, & \text{if } 5 \leq x < 6 \\ 1, & \text{if } x \geq 6 \end{cases}

This CDF indicates the probability that the outcome is less than or equal to a specific value. For example, F(3)F(3) gives the probability of rolling a number less than or equal to 3, which is 12\frac{1}{2}.

Practice Questions on PMF and CDF

Question 1: PMF of a Biased Coin

A biased coin has a 70% chance of landing heads and a 30% chance of landing tails. Let X be the number of heads obtained in one flip. Find the PMF of X.

Solution:

The PMF of X, where X can be either 0 (tails) or 1 (heads), is:

p(x)={0.7,if x=10.3,if x=0p(x) = \begin{cases} 0.7, & \text{if } x = 1 \\ 0.3, & \text{if } x = 0 \end{cases}

This PMF indicates that the probability of getting heads is 0.7 and the probability of getting tails is 0.3.


Question 2: CDF of a Biased Coin

Using the same biased coin from Question 1, find the CDF of X.

Solution:

The CDF of X is:

F(x)={0,if x<00.3,if 0x<11,if x1F(x) = \begin{cases} 0, & \text{if } x < 0 \\ 0.3, & \text{if } 0 \leq x < 1 \\ 1, & \text{if } x \geq 1 \end{cases}

This CDF indicates the cumulative probability distribution of X. For example, F(0)F(0) gives the probability of getting 0 heads (tails), which is 0.3, and F(1)F(1) gives the probability of getting 1 or fewer heads, which is 1.


Question 3: PMF of a Discrete Random Variable

Let X be a discrete random variable representing the number of goals scored by a soccer team in a match, with the following probabilities:

- P(X = 0) = 0.1

- P(X = 1) = 0.3

- P(X = 2) = 0.4

- P(X = 3) = 0.2

Find the PMF of X.

Solution:

The PMF of X is:

p(x)={0.1,if x=00.3,if x=10.4,if x=20.2,if x=3p(x) = \begin{cases} 0.1, & \text{if } x = 0 \\ 0.3, & \text{if } x = 1 \\ 0.4, & \text{if } x = 2 \\ 0.2, & \text{if } x = 3 \end{cases}

This PMF indicates the probabilities of the team scoring 0, 1, 2, or 3 goals in a match.


Question 4: CDF of a Discrete Random Variable

Using the PMF from Question 3, find the CDF of X.

Solution:

The CDF of X is:

F(x)={0,if x<00.1,if 0x<10.4,if 1x<20.8,if 2x<31,if x3F(x) = \begin{cases} 0, & \text{if } x < 0 \\ 0.1, & \text{if } 0 \leq x < 1 \\ 0.4, & \text{if } 1 \leq x < 2 \\ 0.8, & \text{if } 2 \leq x < 3 \\ 1, & \text{if } x \geq 3 \end{cases}

This CDF indicates the cumulative probability distribution of X. For example, F(2)F(2) gives the probability of scoring 2 or fewer goals, which is 0.8.


Question 5: PMF of Rolling Two Dice

Consider rolling two fair six-sided dice. Let Y be the sum of the numbers rolled. Find the PMF of Y.

Solution:

The possible values of Y range from 2 to 12. The PMF of Y is:

p(y)={136,if y=2236,if y=3336,if y=4436,if y=5536,if y=6636,if y=7536,if y=8436,if y=9336,if y=10236,if y=11136,if y=12p(y) = \begin{cases} \frac{1}{36}, & \text{if } y = 2 \\ \frac{2}{36}, & \text{if } y = 3 \\ \frac{3}{36}, & \text{if } y = 4 \\ \frac{4}{36}, & \text{if } y = 5 \\ \frac{5}{36}, & \text{if } y = 6 \\ \frac{6}{36}, & \text{if } y = 7 \\ \frac{5}{36}, & \text{if } y = 8 \\ \frac{4}{36}, & \text{if } y = 9 \\ \frac{3}{36}, & \text{if } y = 10 \\ \frac{2}{36}, & \text{if } y = 11 \\ \frac{1}{36}, & \text{if } y = 12 \\ \end{cases}

This PMF indicates the probabilities of the possible sums when rolling two dice.


Question 6: CDF of Rolling Two Dice

Using the PMF from Question 5, find the CDF of Y.

Solution:

The CDF of Y is:

F(y)={0,if y<2136,if 2y<3336,if 3y<4636,if 4y<51036,if 5y<61536,if 6y<72136,if 7y<82636,if 8y<93036,if 9y<103336,if 10y<113536,if 11y<121,if y12F(y) = \begin{cases} 0, & \text{if } y < 2 \\ \frac{1}{36}, & \text{if } 2 \leq y < 3 \\ \frac{3}{36}, & \text{if } 3 \leq y < 4 \\ \frac{6}{36}, & \text{if } 4 \leq y < 5 \\ \frac{10}{36}, & \text{if } 5 \leq y < 6 \\ \frac{15}{36}, & \text{if } 6 \leq y < 7 \\ \frac{21}{36}, & \text{if } 7 \leq y < 8 \\ \frac{26}{36}, & \text{if } 8 \leq y < 9 \\ \frac{30}{36}, & \text{if } 9 \leq y < 10 \\ \frac{33}{36}, & \text{if } 10 \leq y < 11 \\ \frac{35}{36}, & \text{if } 11 \leq y < 12 \\ 1, & \text{if } y \ge 12 \\ \end{cases}

This CDF indicates the cumulative probability distribution of the sum when rolling two dice. For example, F(7)F(7) gives the probability of getting a sum of 7 or less, which is 2136\frac{21}{36}.